package com.sz.common.core.system.service.impl;

import com.sz.common.base.dao.DaoSupport;
import com.sz.common.core.system.entity.UserRole;
import com.sz.common.core.system.service.UserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Function: UserRoleServiceImpl <br>
 * Author: xutao <br>
 * Date: 2016-10-25 10:51:00
 */
@Service("userRoleService")
public class UserRoleServiceImpl implements UserRoleService {

    @Resource(name = "daoSupport")
    private DaoSupport dao;

    /*
     * (non-Javadoc)
     *
     * @see com.sz.common.core.system.service.UserRoleService#findByUserId(int)
     */
    @Override
    public List<UserRole> findByUserId(int userId) {
        return dao.findForList("UserRoleMapper.findByUserId", userId, UserRole.class);
    }

}
